<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head th:replace="common/common.html::common_css">
</head>
<script>
    function getHref(obj) {
        var a = document.getElementById("btn");
        a.href = obj.href;
    }
</script>
<body>
<div th:replace="common/admin_common.html::common_sidebar"></div>
<div class="page">
    <div th:replace="common/admin_common.html::common_navbar"></div>
    <!-- Breadcrumb-->
    <div class="breadcrumb-holder">
        <div class="container-fluid">
            <ul class="breadcrumb">
                <li class="breadcrumb-item"><a th:href="@{/admin/admin_index.html}">主页</a></li>
                <li class="breadcrumb-item active">试卷审核</li>
            </ul>
        </div>
    </div>
    <section>
        <div class="container-fluid">
            <!-- Page Header-->
            <header>
                <h1 class="h3 display">试卷审核</h1>
            </header>
            <div class="row">
                <div class="col-lg-6" style="flex:100%;max-width: 100%">
                    <div class="card">
                        <div class="card-header">
                            <h4>试卷</h4>

                            <div style="width: 100%;height: 100%;text-align: center">
                                <form class="text-left form-validate" th:action="@{/admin/testpaper_qureycheck.html}"
                                      method="post">
                                    <div style="text-align: center !important;">
                                        <div class="form-group-material" style="float: left;margin-left: 35%;top:25px">
                                            <input id="register-username" type="text"
                                                   style="background-color: #fff !important;" name="qureymessage"
                                                   class="input-material">
                                            <label for="register-username" class="label-material">输入关键词查询</label>
                                        </div>
                                        <div class="form-group text-center"
                                             style="float: left;margin-left: 20px;margin-top: 25px;width: 180px">
                                            <input id="register" type="submit" value="查询" class="btn btn-primary"
                                                   style="width: 100%">
                                        </div>
                                    </div>
                                </form>
                            </div>
                        </div>
                        <div class="card-body">
                            <div class="table-responsive">
                                <table class="table">
                                    <thead style="text-align: center">
                                    <tr>
                                        <th>试卷编号</th>
                                        <th>所属部门</th>
                                        <th>试卷名称</th>
                                        <th>试卷类型</th>
                                        <!--                                        <th>开始时间</th>-->
                                        <!--                                        <th>截止时间</th>-->
                                        <th>状态</th>
                                        <th>操作</th>
                                    </tr>
                                    </thead>
                                    <tbody style="text-align: center">
                                    <tr th:each="testpaper:${pageInfo.list}">
                                        <td th:text="${testpaper.testpaperid}"></td>
                                        <td>
                                            <p th:text="${testpaper.apartmentname}"></p>
                                        </td>
                                        <td th:text="${testpaper.testpapername}"></td>
                                        <td>
                                            <p th:if="${testpaper.type}">固定组卷</p>
                                            <p th:if="${not testpaper.type}">随机组卷</p>
                                        </td>
                                        <td>
                                            <p th:if="${testpaper.status==3}" style="color: red">审核未通过</p>
                                            <p th:if="${testpaper.status==1 and !#maps.containsKey(testpaper,'starttime') and!#maps.containsKey(testpaper,'endtime')}"
                                               style="color: orange">待审核</p>
                                        </td>
                                        <td>
                                            <a id="update"
                                               th:href="@{/admin/testpaper_examineop.html/{id}(id=${testpaper.testpaperid})}"
                                               class="btn btn-warning m-b-10 m-1-5" style="border-radius: 4px"
                                               type="button">审 核</a>
                                        </td>
                                    </tr>
                                    </tbody>
                                </table>
                            </div>
                        </div>
                        <div class="form-group">
                            <div th:replace="common/pageinfosplit.html :: pages_split"></div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </section>
    <div th:replace="common/common.html::common_footer"></div>
</div>
<div th:replace="common/common.html::common_js">
</div>
</body>
</html>